import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler

def data():
    df = pd.read_csv("D:\数据仓库挖掘\\5.聚类\\new_titanic.csv", usecols=['Pclass','Sex','Age','SibSp','Parch','Fare','Embarked','Survived'])
    df = np.array(df)
    scaler = StandardScaler(copy=True, with_mean=True, with_std=True) #中心标准化
    scaler = scaler.fit_transform(df)
    return scaler
# print(scaler)